
#encodin: utf-8


from PIL import Image, ImageFilter


def main():
	image = Image.open('./res/guido.jpg')
	print(image.format)
	print(image.size)
	print(image.mode)
	# image.show()

	# rect = 80, 20, 310, 360
	# image.crop(rect).show()

	# size = 128, 128 
	# image.thumbnail(size)
	# image.show()

	# image1 = Image.open('./res/luohao.png')
	# rect = 80, 20, 310 , 360 
	# guido_head = image1.crop(rect)
	# width, height = guido_head.size
	# image.paste(guido_head.resize((int(width/1.5), int(height/1.5))) , (172, 40))
	# image.show()

	# image.rotata(180).show()
	# image.transpose(Image.FLIP_LEFT_RIGHT).show()

	# for x in range(30, 310):
	# 	for y in range(20, 360):
	# 		image.putpixel((x, y), (128, 128, 128))

	# image.show()

	# image.filter(ImageFilter.CONTOUR).show()




if __name__ == '__main__':
	main()






